/*
 * Sesame Inc.
 * Copyright (c) 2009 All Rights Reserved.
 */
package com.sesame.controller;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.validation.BindException;
import org.springframework.web.servlet.mvc.AbstractController;
import org.springframework.web.servlet.mvc.SimpleFormController;

import com.sesame.domain.Album;
import com.sesame.domain.Image;
import com.sesame.domain.Notice;
import com.sesame.domain.User;
import com.sesame.service.AlbumService;
import com.sesame.service.ContactService;
import com.sesame.service.PageService;
import com.sesame.service.UserService;
import com.sesame.toolkit.Page;

/**
 * @author voidman
 * 
 */
public class ShowNoticeController extends AbstractController {

    private UserService userService;

    public void setUserService(UserService userService) {
        this.userService = userService;
    }
    protected ModelAndView handleRequestInternal(HttpServletRequest request,
            HttpServletResponse response) throws Exception {

       
        Integer id = Integer.parseInt(request.getParameter("noticeId"));
        Notice notice = userService.showNotice(id);
        Map model = new HashMap();
        model.put("notice", notice);

        return new ModelAndView("showNotice", model);
    }

}